<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        height: 300px;
        border: 1px solid black;
      }
    </style>
  </head>
  <body>
    <div id="root"></div>
    <script src="./js/react.development.js "></script>
    <script src="./js/react-dom.development.js "></script>
    <script src="./js/babel.min.js "></script>
    <script type="text/babel">
      const div = (
        <div
          className="box"
          // 1. 如果单位是px,则可以忽略 2. css属性有-的,则写成小驼峰的形式 3. 其他单位不能忽略.要写成字符串
          style={{ width: 100, backgroundColor: 'red', fontSize: '3rem' }}
        >
          你好
        </div>
      )
      ReactDOM.render(div, document.getElementById('root'))
    </script>
  </body>
</html>
